package cl.tinet.finalexam.ejb.user;

import java.util.Collection;

import javax.ejb.Remote;

import cl.tinet.finalexam.exceptions.UserBadCredentialsException;
import cl.tinet.finalexam.exceptions.UserNotFoundException;
import cl.tinet.finalexam.model.UserModel;

@Remote
public interface UserBeanInterface {

    /**
     * 
     * Check Login
     *
     * @param username
     * @param password
     * @return
     * @throws UserNotFoundException
     * @throws UserBadCredentialsException
     */
    public UserModel checkLogin(String username, String password)
            throws UserNotFoundException, UserBadCredentialsException;
    
    /**
     * 
     * Obtener usuarios
     *
     * @return
     */
    public Collection<UserModel> allUsers();
    
    /**
     * 
     * Busqueda por username
     *
     * @param usernameToSearch
     * @return
     * @throws UserNotFoundException
     */
    public UserModel searchByUsername(String usernameToSearch)
            throws UserNotFoundException;
    
    /**
     * 
     * Busqueda usuario por id.
     *
     * @param userID
     * @return
     */
    public UserModel searchUserByID(int userID);
} 
